package com.okhttpdemo.http;

import okhttp3.Response;
import okhttp3.ResponseBody;

/**
 * Created by 黄海 on 2/28/2017.
 */

public final class MyResponse<T> {
    private okhttp3.Response rawResponse;
    private T body;
    private ResponseBody errorBody;

    public MyResponse(Response rawResponse, T body, ResponseBody errorBody) {
        this.rawResponse = rawResponse;
        this.body = body;
        this.errorBody = errorBody;
    }

    public Response getRawResponse() {
        return rawResponse;
    }

    public void setRawResponse(Response rawResponse) {
        this.rawResponse = rawResponse;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public ResponseBody getErrorBody() {
        return errorBody;
    }

    public void setErrorBody(ResponseBody errorBody) {
        this.errorBody = errorBody;
    }
}
